<!doctype html>
<html lang="zh">

<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
        integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">

    <title>bootstrap 练习</title>
    <style>
        div {
            border: 2px rgba(165, 60, 60, 0.63) solid;
            /* margin-bottom: 0.5em; */
        }

    </style>
</head>

<body>

    <h1 class="container-fluid">bootstrap 练习</h1>
    <section>
        <h2>layout</h2>
        <div class="container">
            <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Magnam, adipisci! Dolorem officia enim quasi
                voluptas harum tenetur qui distinctio. Molestias facilis odit adipisci repudiandae beatae inventore
                aliquid
                iusto necessitatibus voluptatum?</p>
        </div>
        <div class="container-fluid">
            <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Magnam, adipisci! Dolorem officia enim quasi
                voluptas harum tenetur qui distinctio. Molestias facilis odit adipisci repudiandae beatae inventore
                aliquid
                iusto necessitatibus voluptatum?</p>
        </div>
        <div class="container-sm">100% wide until small breakpoint</div>
        <div class="container-md">100% wide until medium breakpoint</div>
        <div class="container-lg">100% wide until large breakpoint</div>
        <div class="container-xl">100% wide until extra large breakpoint</div>

    </section>

    <section>
        <h2>grid</h2>
        <h3>自动布局列</h3>
        <div class="container">
            <div class="row">
                <div class="col-sm">
                    One of three columns
                </div>
                <div class="col-sm">
                    One of three columns
                </div>
                <div class="col-sm">
                    One of three columns
                </div>
            </div>
        </div>
        <div class="container">
            <div class="row">
                <div class="col">
                    1 of 2
                </div>
                <div class="col">
                    2 of 2
                </div>
            </div>
            <div class="row">
                <div class="col">
                    1 of 3
                </div>
                <div class="col">
                    2 of 3
                </div>
                <div class="col">
                    3 of 3
                </div>
            </div>
        </div>
        <h3>多行等宽的实现</h3>
        <div class="container">
            <div class="row">
                <div class="col">col</div>
                <div class="col">col</div>
                <div class="w-100"></div>
                <div class="col">col</div>
                <div class="col">col</div>
            </div>
        </div>
        <div class="container">
            <!-- 可实现多列等宽布局 -->
            <div class="row">
                <div class="col">col</div>
                <div class="col">col</div>
                <div class="col">col</div>
                <div class="col">col</div>
                <div class="col">col</div>
                <div class="col">col</div>
                <div class="col">col</div>
                <div class="col">col</div>
                <div class="col">col</div>
                <div class="col">col</div>
                <div class="col">col</div>

            </div>
        </div>
        <div class="container">
            <div class="row">
                <div class="col">
                    1 of 3
                </div>
                <div class="col-10">
                    2 of 3 (wider)
                </div>
                <div class="col">
                    3 of 3
                </div>
            </div>
            <div class="row">
                <div class="col">
                    1 of 3
                </div>
                <div class="col-5">
                    2 of 3 (wider)
                </div>
                <div class="col">
                    3 of 3
                </div>
            </div>
        </div>
        <div class="container">
            <div class="row justify-content-md-center">
                <div class="col col-lg-2">
                    1 of 3
                </div>
                <div class="col-md-auto">
                    Variable width content
                </div>
                <div class="col col-lg-2">
                    3 of 3
                </div>
            </div>
            <div class="row">
                <div class="col">
                    1 of 3
                </div>
                <div class="col-md-auto">
                    Variable width contentVariable width contentVariable width content
                </div>
                <div class="col col-lg-2">
                    3 of 3
                </div>
            </div>
        </div>
        <div class="container">
            <!-- Stack the columns on mobile by making one full-width and the other half-width -->
            <div class="row">
                <div class="col-md-8">.col-md-8</div>
                <div class="col-6 col-md-4">.col-6 .col-md-4</div>
            </div>

            <!-- Columns start at 50% wide on mobile and bump up to 33.3% wide on desktop -->
            <div class="row">
                <div class="col-6 col-md-4">.col-6 .col-md-4</div>
                <div class="col-6 col-md-4">.col-6 .col-md-4</div>
                <div class="col-6 col-md-4">.col-6 .col-md-4</div>
            </div>

            <!-- Columns are always 50% wide, on mobile and desktop -->
            <div class="row">
                <div class="col-6">.col-6</div>
                <div class="col-6">.col-6</div>
            </div>
        </div>

        <!-- <div class="container px-lg-5">
            <div class="row mx-lg-n5">
                <div class="col py-3 px-lg-5 border bg-light">Custom column padding</div>
                <div class="col py-3 px-lg-5 border bg-light">Custom column padding</div>
            </div>
        </div> -->
        <div class="container">
            <div class="row row-cols-2">
                <div class="col">Column</div>
                <div class="col">Column</div>
                <div class="col">Column</div>
                <div class="col">Column</div>
            </div>
        </div>
        <div class="container">
            <div class="row row-cols-3">
                <div class="col">Column</div>
                <div class="col">Column</div>
                <div class="col">Column</div>
                <div class="col">Column</div>
            </div>
        </div>
    </section>
    <section>
        <h2>垂直对齐</h2>
        <div class="container">
            <div class="row align-items-start" style="height: 4rem;">
                <div class="col">
                    One of three columns
                </div>
                <div class="col">
                    One of three columns
                </div>
                <div class="col">
                    One of three columns
                </div>
            </div>
            <div class="row align-items-center" style="height: 4rem;">
                <div class="col">
                    One of three columns
                </div>
                <div class="col">
                    One of three columns
                </div>
                <div class="col">
                    One of three columns
                </div>
            </div>
            <div class="row align-items-end" style="height: 4rem;">
                <div class="col">
                    One of three columns
                </div>
                <div class="col">
                    One of three columns
                </div>
                <div class="col">
                    One of three columns
                </div>
            </div>
        </div>
        <div class="container">
            <div class="row" style="height: 6em;">
                <div class="col align-self-start">
                    One of three columns
                </div>
                <div class="col align-self-center">
                    One of three columns
                </div>
                <div class="col align-self-end">
                    One of three columns
                </div>
            </div>
        </div>
    </section>
    <section>
        <h2>偏移</h2>
        <div class="container">
            <div class="row">
                <div class="col-md-4">.col-md-4</div>
                <div class="col-md-4 offset-md-4">.col-md-4 .offset-md-4</div>
            </div>
            <div class="row">
                <div class="col-md-3 offset-md-3">.col-md-3 .offset-md-3</div>
                <div class="col-md-3 offset-md-3">.col-md-3 .offset-md-3</div>
            </div>
            <div class="row">
                <div class="col-md-6 offset-md-3">.col-md-6 .offset-md-3</div>
            </div>
        </div>
    </section>
    <section>
        <h2>嵌套</h2>
        <div class="container">
            <div class="row">
                <div class="col-sm-9">
                    Level 1: .col-sm-9
                    <div class="row">
                        <div class="col-8 col-sm-6">
                            Level 2: .col-8 .col-sm-6
                        </div>
                        <div class="col-4 col-sm-6">
                            Level 2: .col-4 .col-sm-6
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
        integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
        crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
        integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
        crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
        integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
        crossorigin="anonymous"></script>
</body>

</html>
